package com.leadCode.easy;

import java.util.LinkedList;

public class CQueue {
    LinkedList<Integer> list1 = new LinkedList();
    LinkedList<Integer> list2 = new LinkedList();

    public void appendTail(int value) {
        list1.add(value);
        //list2.remove();
    }

    public int deleteHead() {
        if (list1.size() == 0) return -1;
        return list1.remove();
    }

    public static void main(String[] args) {
        CQueue cQueue = new CQueue();
        cQueue.appendTail(1);
        cQueue.appendTail(2);
        cQueue.appendTail(3);
        cQueue.appendTail(4);

        System.err.println(cQueue.deleteHead());
        System.err.println(cQueue.deleteHead());
        System.err.println(cQueue.deleteHead());
    }
}
